package com.hrm.common.exception;

import com.hrm.common.entity.ResultCode;
import lombok.Getter;

/**
 * 自定义异常处理
 */
@Getter
public class CommonException extends RuntimeException {

    private ResultCode code = ResultCode.SERVER_ERROR;

    public CommonException(){}

    public CommonException(ResultCode resultCode){
        super(resultCode.message());
        this.code = resultCode;
    }
}
